#!/bin/sh

#$Id: install.sh 395 2009-03-12 06:41:28Z cameron.bracken $

webuser=wwwrun

# Create the web directory structure
mkdir sandbox
mkdir sandbox/www
mkdir sandbox/runs
mkdir sandbox/output
mkdir sandbox/output/logs
mkdir sandbox/output/img
mkdir sandbox/output/data
mkdir sandbox/pondSim

#Copy the template files
cp brew/vars.brew.php sandbox/www/vars.php
cp default/pondsim-input-default sandbox/runs/
cp default/pondSim-default.input sandbox/pondSim/
cp default/pondSim-default.output sandbox/output/data/
cp default/barplot-default.png sandbox/output/img/barplot-default.png
cp default/barplot-default.svg sandbox/output/img/barplot-default.svg

#Change the ownership
sudo chown -R $webuser sandbox

#Build pondSim
cd pondSim
make
cd ..

#install geshi
cd includes
tar -xzf GeSHi-1.0.8.2.tar.gz 
rm -rf geshi/geshi/*
rm -rf geshi/docs
rm -rf geshi/contrib
cp ../static/pondsimlog.php geshi/geshi/
cd ..
